﻿using UnityEngine;

namespace Framework
{
    public static class ChunkRender
    {
        public static GameObject RenderChunk(Chunk chunk)
        {
            GameObject chunkGo = new GameObject("StaticBlock");
            chunkGo.transform.position = CoordConvert.Cnk2Pos(chunk.position);
            GameObject staticBlock = StaticBlockChunkRender.RenderStaticBlockInChunk(chunk);
            staticBlock.transform.SetParent(chunkGo.transform);
            staticBlock.transform.localPosition = Vector3.zero;
            return chunkGo;
        }
    }
}